﻿@page
@{ Layout = "_Layout"; }

<div style="padding:0 11px;">
    <div>
        <el-form :inline="true" :size="euiSize">
            <el-form-item label="关键字">
                <el-input v-model="form.keywords" placeholder="组织、用户名、姓名" prefix-icon="el-icon-search" clearable></el-input>
            </el-form-item>
            <el-form-item label="状态">
                <el-select v-model="form.isSubmit" placeholder="全部状态">
                    <el-option label="全部状态" value=""></el-option>
                    <el-option label="已提交" value="1"></el-option>
                    <el-option label="未提交" value="0"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item>
                <el-button :size="euiSize" icon="el-icon-search" type="primary" v-on:click="btnUserSearchClick">查 询</el-button>
            </el-form-item>
        </el-form>
    </div>
    <div>
        <el-table ref="userTable" :data="list" :size="euiSize"
                  style="width: 100%">
            <el-table-column label="#"
                             type="index"
                             width="60"
                             align="left">
                <template scope="scope">
                    <span>{{(form.pageIndex - 1) * form.pageSize + scope.$index + 1}}</span>
                </template>
            </el-table-column>
            <el-table-column label="账号">
                <template slot-scope="scope">
                    <el-link :underline="false" type="primary" v-on:click="utils.openUserView(scope.row.user.id)">{{scope.row.user.userName}}</el-link>
                </template>
            </el-table-column>
            <el-table-column prop="user.displayName" label="姓名">
            </el-table-column>
            <el-table-column prop="user.organNames" label="组织" show-overflow-toolti>
            </el-table-column>
            <el-table-column label="提交时间" width="270" show-overflow-toolti>
                <template slot-scope="scope">
                    <span v-if="scope.row.submitType==='Submit'">
                        {{ scope.row.examBeginDateTime }}/{{ scope.row.examEndDateTime }}
                    </span>
                    <span v-else>/</span>
                </template>
            </el-table-column>
            <el-table-column label="状态" width="100" align="right">
                <template slot-scope="scope">
                    <el-tag effect="dark" type="success" v-if="scope.row.submitType==='Submit'" :size="euiSize">已提交</el-tag>
                    <span v-else>/</span>
                </template>
            </el-table-column>
            @await Html.PartialAsync("_PartialTableEmpty")
        </el-table>

        <div style="text-align: center; margin-top: 10px;">
            <el-pagination v-on:current-change="userHandleCurrentChange" background
                           :current-page="form.pageIndex"
                           :page-size="form.pageSize"
                           layout="total, prev, pager, next"
                           :total="total">
            </el-pagination>
        </div>
    </div>
</div>
@section Scripts{
    <script src="/sitefiles/assets/js/admin/exam/examQuestionnaireUsers.js" type="text/javascript"></script>
}